relookup nodes after external functions have been called. also relookup
authorTim Janik <timj@gtk.org>
Tue, 11 Aug 1998 19:29:36 +0000 (19:29 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 11 Aug 1998 19:29:36 +0000 (19:29 +0000)
Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
        external functions have been called. also relookup nodes after
        this function has been invoked.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtk.defs
gtk/gtktypebuiltins_evals.c
gtk/gtktypeutils.c

index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index 866637bf5d35f627dc17f9a75e480bd8b75e7e74..6c931162c52f222a080ba11782c0d7d725199ca4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>
+
+       * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
+       external functions have been called. also relookup nodes after
+       this function has been invoked.
+
 Tue Aug 11 15:04:52 1998  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktext.[ch]: Removed has_cursor, set the cursor
index f67841bd5fe4c7cd3675fb10b905561a4e0d5e2e..181a95047d2b7eb029eaf60cdad8b82838c8e259 100644 (file)
 (define-enum GdkFunction
    (copy GDK_COPY)
    (invert GDK_INVERT)
-   (xor GDK_XOR))
+   (xor GDK_XOR)
+   (clear GDK_CLEAR)
+   (and GDK_AND)
+   (and-reverse GDK_AND_REVERSE)
+   (and-invert GDK_AND_INVERT)
+   (noop GDK_NOOP)
+   (or GDK_OR)
+   (equiv GDK_EQUIV)
+   (or-reverse GDK_OR_REVERSE)
+   (copy-invert GDK_COPY_INVERT)
+   (or-invert GDK_OR_INVERT)
+   (nand GDK_NAND)
+   (set GDK_SET))
 
 (define-enum GdkFill
    (solid GDK_SOLID)
index 3034fe698eb702830901205d00065c986f8bb5ab..ba0eee19d56243ab25894ed0c02c26a1dd2f8e6c 100644 (file)
@@ -501,6 +501,18 @@ static GtkEnumValue _gdk_function_values[] = {
   { GDK_COPY, "GDK_COPY", "copy" },
   { GDK_INVERT, "GDK_INVERT", "invert" },
   { GDK_XOR, "GDK_XOR", "xor" },
+  { GDK_CLEAR, "GDK_CLEAR", "clear" },
+  { GDK_AND, "GDK_AND", "and" },
+  { GDK_AND_REVERSE, "GDK_AND_REVERSE", "and-reverse" },
+  { GDK_AND_INVERT, "GDK_AND_INVERT", "and-invert" },
+  { GDK_NOOP, "GDK_NOOP", "noop" },
+  { GDK_OR, "GDK_OR", "or" },
+  { GDK_EQUIV, "GDK_EQUIV", "equiv" },
+  { GDK_OR_REVERSE, "GDK_OR_REVERSE", "or-reverse" },
+  { GDK_COPY_INVERT, "GDK_COPY_INVERT", "copy-invert" },
+  { GDK_OR_INVERT, "GDK_OR_INVERT", "or-invert" },
+  { GDK_NAND, "GDK_NAND", "nand" },
+  { GDK_SET, "GDK_SET", "set" },
   { 0, NULL, NULL }
 };
 static GtkEnumValue _gdk_fill_values[] = {
index a876a7d88485af83f2bd203dbb5018bece74d376..0181d7dc604e037ef29e9536f66b274755d3d3e8 100644 (file)
@@ -53,7 +53,7 @@ struct _GtkTypeNode
     node_var = NULL; \
 }
 
-static void  gtk_type_class_init               (GtkTypeNode *node);
+static void  gtk_type_class_init               (GtkType      node_type);
 static guint gtk_type_name_hash                        (const char  *key);
 static gint  gtk_type_name_compare             (const char  *a,
                                                 const char  *b);
@@ -296,7 +296,11 @@ gtk_type_parent_class (GtkType type)
       if (node)
        {
          if (!node->klass)
-           gtk_type_class_init (node);
+           {
+             type = node->type;
+             gtk_type_class_init (type);
+             LOOKUP_TYPE_NODE (node, type);
+           }
          
          return node->klass;
        }
@@ -314,7 +318,11 @@ gtk_type_class (GtkType type)
   g_return_val_if_fail (node != NULL, NULL);
   
   if (!node->klass)
-    gtk_type_class_init (node);
+    {
+      type = node->type;
+      gtk_type_class_init (type);
+      LOOKUP_TYPE_NODE (node, type);
+    }
   
   return node->klass;
 }
@@ -483,8 +491,13 @@ gtk_type_is_a (GtkType type,
 }
 
 static void
-gtk_type_class_init (GtkTypeNode *node)
+gtk_type_class_init (GtkType type)
 {
+  GtkTypeNode *node;
+
+  /* we need to relookup nodes everytime we called an external function */
+  LOOKUP_TYPE_NODE (node, type);
+  
   if (!node->klass && node->type_info.class_size)
     {
       GtkObjectClass *object_class;
@@ -501,7 +514,11 @@ gtk_type_class_init (GtkTypeNode *node)
          
          LOOKUP_TYPE_NODE (parent, node->parent_type);
          if (!parent->klass)
-           gtk_type_class_init (parent);
+           {
+             gtk_type_class_init (parent->type);
+             LOOKUP_TYPE_NODE (node, type);
+             LOOKUP_TYPE_NODE (parent, node->parent_type);
+           }
          
          if (parent->klass)
            memcpy (node->klass, parent->klass, parent->type_info.class_size);
@@ -531,6 +548,7 @@ gtk_type_class_init (GtkTypeNode *node)
              
              base_class_init = walk->data;
              base_class_init (node->klass);
+             LOOKUP_TYPE_NODE (node, type);
            }
          g_slist_free (slist);
        }